package generator.thread;
import generator.driver.GeneratorStatistics;
import generator.structure.Pair;

import java.util.ArrayList;
import java.util.concurrent.CountDownLatch;

public class MutualThread implements Runnable{

	CountDownLatch latch;
	
	Pair<Integer, Integer> columnPair;
	ArrayList<Pair<Pair<String, String>, Integer>> mutualArray;
	
	int isFast;
	int ldaFlag = 0;
	
	int whichGroup;
	
	
	public MutualThread(CountDownLatch latch, int isFast, int ldaFlag, int i) {
		this.isFast = isFast;
		this.ldaFlag = ldaFlag;
		this.latch = latch;
		this.whichGroup = i;
	}
	
	@Override
	public void run() {

		if(isFast == 0)
			GeneratorStatistics.mutual.LDAcompute(whichGroup);
		else
			GeneratorStatistics.mutual.LDAfastCompute(whichGroup);
		
		latch.countDown();
	}

}
